3.49 \(\int \frac{x^3 (d+e x^2+f x^4)}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=144 \[ \frac{\log \left (a+b x^2+c x^4\right ) \left (-c (a f+b e)+b^2 f+c^2 d\right )}{4 c^3}-\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-b c (c d-3 a f)-2 a c^2 e+b^2 c e+b^3 (-f)\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{x^2 (c e-b f)}{2 c^2}+\frac{f x^4}{4 c} \]

[Out]

((c*e - b*f)*x^2)/(2*c^2) + (f*x^4)/(4*c) - ((b^2*c*e - 2*a*c^2*e - b^3*f - b*c*(c*d - 3*a*f))*ArcTanh[(b + 2*
c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^3*Sqrt[b^2 - 4*a*c]) + ((c^2*d + b^2*f - c*(b*e + a*f))*Log[a + b*x^2 + c*x^4]
)/(4*c^3)

________________________________________________________________________________________

Rubi [A]  time = 0.271637, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1663, 1628, 634, 618, 206, 628} \[ \frac{\log \left (a+b x^2+c x^4\right ) \left (-c (a f+b e)+b^2 f+c^2 d\right )}{4 c^3}-\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-b c (c d-3 a f)-2 a c^2 e+b^2 c e+b^3 (-f)\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{x^2 (c e-b f)}{2 c^2}+\frac{f x^4}{4 c} \]

Antiderivative was successfully verified.

[In]

Int[(x^3*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4),x]

[Out]

((c*e - b*f)*x^2)/(2*c^2) + (f*x^4)/(4*c) - ((b^2*c*e - 2*a*c^2*e - b^3*f - b*c*(c*d - 3*a*f))*ArcTanh[(b + 2*
c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^3*Sqrt[b^2 - 4*a*c]) + ((c^2*d + b^2*f - c*(b*e + a*f))*Log[a + b*x^2 + c*x^4]
)/(4*c^3)

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x^3 \left (d+e x^2+f x^4\right )}{a+b x^2+c x^4} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{x \left (d+e x+f x^2\right )}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{c e-b f}{c^2}+\frac{f x}{c}-\frac{a (c e-b f)-\left (c^2 d-b c e+b^2 f-a c f\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=\frac{(c e-b f) x^2}{2 c^2}+\frac{f x^4}{4 c}-\frac{\operatorname{Subst}\left (\int \frac{a (c e-b f)-\left (c^2 d-b c e+b^2 f-a c f\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c^2}\\ &=\frac{(c e-b f) x^2}{2 c^2}+\frac{f x^4}{4 c}-\frac{\left (-c^2 d+b c e-b^2 f+a c f\right ) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}+\frac{\left (b^2 c e-2 a c^2 e-b^3 f-b c (c d-3 a f)\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}\\ &=\frac{(c e-b f) x^2}{2 c^2}+\frac{f x^4}{4 c}+\frac{\left (c^2 d-b c e+b^2 f-a c f\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}-\frac{\left (b^2 c e-2 a c^2 e-b^3 f-b c (c d-3 a f)\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^3}\\ &=\frac{(c e-b f) x^2}{2 c^2}+\frac{f x^4}{4 c}-\frac{\left (b^2 c e-2 a c^2 e-b^3 f-b c (c d-3 a f)\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{\left (c^2 d-b c e+b^2 f-a c f\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}\\ \end{align*}

Mathematica [A]  time = 0.106951, size = 136, normalized size = 0.94 \[ \frac{\log \left (a+b x^2+c x^4\right ) \left (-c (a f+b e)+b^2 f+c^2 d\right )-\frac{2 \tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right ) \left (b c (c d-3 a f)+2 a c^2 e-b^2 c e+b^3 f\right )}{\sqrt{4 a c-b^2}}+2 c x^2 (c e-b f)+c^2 f x^4}{4 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^3*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4),x]

[Out]

(2*c*(c*e - b*f)*x^2 + c^2*f*x^4 - (2*(-(b^2*c*e) + 2*a*c^2*e + b^3*f + b*c*(c*d - 3*a*f))*ArcTan[(b + 2*c*x^2
)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + (c^2*d + b^2*f - c*(b*e + a*f))*Log[a + b*x^2 + c*x^4])/(4*c^3)

________________________________________________________________________________________

Maple [B]  time = 0.005, size = 321, normalized size = 2.2 \begin{align*}{\frac{f{x}^{4}}{4\,c}}-{\frac{bf{x}^{2}}{2\,{c}^{2}}}+{\frac{e{x}^{2}}{2\,c}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) af}{4\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ){b}^{2}f}{4\,{c}^{3}}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) be}{4\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) d}{4\,c}}+{\frac{3\,abf}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{ae}{c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{{b}^{3}f}{2\,{c}^{3}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{{b}^{2}e}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bd}{2\,c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x)

[Out]

1/4*f*x^4/c-1/2/c^2*b*f*x^2+1/2/c*e*x^2-1/4/c^2*ln(c*x^4+b*x^2+a)*a*f+1/4/c^3*ln(c*x^4+b*x^2+a)*b^2*f-1/4/c^2*
ln(c*x^4+b*x^2+a)*b*e+1/4/c*ln(c*x^4+b*x^2+a)*d+3/2/c^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2)
)*a*b*f-1/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*e*a-1/2/c^3/(4*a*c-b^2)^(1/2)*arctan((2*c*
x^2+b)/(4*a*c-b^2)^(1/2))*b^3*f+1/2/c^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b^2*e-1/2/c/(4
*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.96605, size = 994, normalized size = 6.9 \begin{align*} \left [\frac{{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f x^{4} + 2 \,{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e -{\left (b^{3} c - 4 \, a b c^{2}\right )} f\right )} x^{2} -{\left (b c^{2} d -{\left (b^{2} c - 2 \, a c^{2}\right )} e +{\left (b^{3} - 3 \, a b c\right )} f\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c -{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e +{\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}, \frac{{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f x^{4} + 2 \,{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e -{\left (b^{3} c - 4 \, a b c^{2}\right )} f\right )} x^{2} + 2 \,{\left (b c^{2} d -{\left (b^{2} c - 2 \, a c^{2}\right )} e +{\left (b^{3} - 3 \, a b c\right )} f\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e +{\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[1/4*((b^2*c^2 - 4*a*c^3)*f*x^4 + 2*((b^2*c^2 - 4*a*c^3)*e - (b^3*c - 4*a*b*c^2)*f)*x^2 - (b*c^2*d - (b^2*c -
2*a*c^2)*e + (b^3 - 3*a*b*c)*f)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 - 2*a*c - (2*c*x^2 + b)*sqr
t(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) + ((b^2*c^2 - 4*a*c^3)*d - (b^3*c - 4*a*b*c^2)*e + (b^4 - 5*a*b^2*c + 4*a
^2*c^2)*f)*log(c*x^4 + b*x^2 + a))/(b^2*c^3 - 4*a*c^4), 1/4*((b^2*c^2 - 4*a*c^3)*f*x^4 + 2*((b^2*c^2 - 4*a*c^3
)*e - (b^3*c - 4*a*b*c^2)*f)*x^2 + 2*(b*c^2*d - (b^2*c - 2*a*c^2)*e + (b^3 - 3*a*b*c)*f)*sqrt(-b^2 + 4*a*c)*ar
ctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) + ((b^2*c^2 - 4*a*c^3)*d - (b^3*c - 4*a*b*c^2)*e + (b^4
- 5*a*b^2*c + 4*a^2*c^2)*f)*log(c*x^4 + b*x^2 + a))/(b^2*c^3 - 4*a*c^4)]

________________________________________________________________________________________

Sympy [B]  time = 19.7194, size = 721, normalized size = 5.01 \begin{align*} \left (- \frac{\sqrt{- 4 a c + b^{2}} \left (3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{a c f - b^{2} f + b c e - c^{2} d}{4 c^{3}}\right ) \log{\left (x^{2} + \frac{2 a^{2} c f - a b^{2} f + a b c e + 8 a c^{3} \left (- \frac{\sqrt{- 4 a c + b^{2}} \left (3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{a c f - b^{2} f + b c e - c^{2} d}{4 c^{3}}\right ) - 2 a c^{2} d - 2 b^{2} c^{2} \left (- \frac{\sqrt{- 4 a c + b^{2}} \left (3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{a c f - b^{2} f + b c e - c^{2} d}{4 c^{3}}\right )}{3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d} \right )} + \left (\frac{\sqrt{- 4 a c + b^{2}} \left (3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{a c f - b^{2} f + b c e - c^{2} d}{4 c^{3}}\right ) \log{\left (x^{2} + \frac{2 a^{2} c f - a b^{2} f + a b c e + 8 a c^{3} \left (\frac{\sqrt{- 4 a c + b^{2}} \left (3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{a c f - b^{2} f + b c e - c^{2} d}{4 c^{3}}\right ) - 2 a c^{2} d - 2 b^{2} c^{2} \left (\frac{\sqrt{- 4 a c + b^{2}} \left (3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{a c f - b^{2} f + b c e - c^{2} d}{4 c^{3}}\right )}{3 a b c f - 2 a c^{2} e - b^{3} f + b^{2} c e - b c^{2} d} \right )} + \frac{f x^{4}}{4 c} - \frac{x^{2} \left (b f - c e\right )}{2 c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(f*x**4+e*x**2+d)/(c*x**4+b*x**2+a),x)

[Out]

(-sqrt(-4*a*c + b**2)*(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*d)/(4*c**3*(4*a*c - b**2)) - (a*c*f
 - b**2*f + b*c*e - c**2*d)/(4*c**3))*log(x**2 + (2*a**2*c*f - a*b**2*f + a*b*c*e + 8*a*c**3*(-sqrt(-4*a*c + b
**2)*(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*d)/(4*c**3*(4*a*c - b**2)) - (a*c*f - b**2*f + b*c*e
 - c**2*d)/(4*c**3)) - 2*a*c**2*d - 2*b**2*c**2*(-sqrt(-4*a*c + b**2)*(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*
c*e - b*c**2*d)/(4*c**3*(4*a*c - b**2)) - (a*c*f - b**2*f + b*c*e - c**2*d)/(4*c**3)))/(3*a*b*c*f - 2*a*c**2*e
 - b**3*f + b**2*c*e - b*c**2*d)) + (sqrt(-4*a*c + b**2)*(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*
d)/(4*c**3*(4*a*c - b**2)) - (a*c*f - b**2*f + b*c*e - c**2*d)/(4*c**3))*log(x**2 + (2*a**2*c*f - a*b**2*f + a
*b*c*e + 8*a*c**3*(sqrt(-4*a*c + b**2)*(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*d)/(4*c**3*(4*a*c
- b**2)) - (a*c*f - b**2*f + b*c*e - c**2*d)/(4*c**3)) - 2*a*c**2*d - 2*b**2*c**2*(sqrt(-4*a*c + b**2)*(3*a*b*
c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*d)/(4*c**3*(4*a*c - b**2)) - (a*c*f - b**2*f + b*c*e - c**2*d)/(
4*c**3)))/(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*d)) + f*x**4/(4*c) - x**2*(b*f - c*e)/(2*c**2)

________________________________________________________________________________________

Giac [A]  time = 1.14972, size = 190, normalized size = 1.32 \begin{align*} \frac{c f x^{4} - 2 \, b f x^{2} + 2 \, c x^{2} e}{4 \, c^{2}} + \frac{{\left (c^{2} d + b^{2} f - a c f - b c e\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{3}} - \frac{{\left (b c^{2} d + b^{3} f - 3 \, a b c f - b^{2} c e + 2 \, a c^{2} e\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/4*(c*f*x^4 - 2*b*f*x^2 + 2*c*x^2*e)/c^2 + 1/4*(c^2*d + b^2*f - a*c*f - b*c*e)*log(c*x^4 + b*x^2 + a)/c^3 - 1
/2*(b*c^2*d + b^3*f - 3*a*b*c*f - b^2*c*e + 2*a*c^2*e)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4
*a*c)*c^3)